package com.woniuxy01;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 作者
 * @create 2025-06-09 10:35
 */
public class Test05 {
    public static void main(String[] args) {
        Map<String, Student> map = new HashMap<>();
        map.put("1", new Student("1", "zs", 11));
        map.put("2", new Student("2", "ww", 12));
        map.put("3", new Student("3", "ls", 13));
        System.out.println(map.get("3"));
        System.out.println(map);
        System.out.println(map.size());
        System.out.println(map.containsKey("1"));
        System.out.println(map.containsKey("11"));
        System.out.println(map.containsValue(new Student("3", "ls", 13) ));
        System.out.println(map.containsValue(new Student("4", "ls", 13) ));


//        map.clear();
//        Student r1 = map.remove("2");
//        Student r2 = map.remove("12");
//        System.out.println(map.size());
//        System.out.println(r1);
//        System.out.println(r2);
    }
}
